from django.contrib import admin

# Register your models here.

from .models import GoodsCategory, Good, GoodsCategoryBrand


@admin.register(Good)
class GoodAdmin(admin.ModelAdmin):
    autocomplete_fields = ['category', ]

    raw_id_fields = ('category',)


@admin.register(GoodsCategory)
class GoodsCategoryAdmin(admin.ModelAdmin):
    search_fields = ['name']


@admin.register(GoodsCategoryBrand)
class GoodsCategoryBrandAdmin(admin.ModelAdmin):
    autocomplete_fields = ['category', ]

    raw_id_fields = ('category',)
